/*----------------------------------------------------------------------------------------
* Description:  Service Layer of the Database[JieBooLaw]'s Table[dbo.TSys_User].
* Author:       Roman He 
* Create Date:  8/9/2012
* History:      1. Roman He      Created
                2.
                3.
------------------------------------------------------------------------------------------
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace JieBooLaw.Service
{
    using JieBooLaw.Domain;
    using JieBooLaw.Persistence;
    
	/// <summary>
	/// Service class of the Database[JieBooLaw]'s Table[dbo.TSys_User].
	/// </summary>
	public partial class TSys_UserSvc
	{       
        /// <summary>
        /// Get All List
        /// </summary>
        /// <returns></returns>
        public IList<TSys_User> GetAllList()
        {
            List<TSys_User> result = context.GetAll<TSys_User>().ToList();

            return result;
        }

        /// <summary>
        /// Get single item by key
        /// </summary>
        /// <param name="item">object single item</param>
        /// <returns></returns>
        public TSys_User GetByKey(TSys_User item)
        {
            TSys_User result = context.GetById<TSys_User>(item);

            return result;
        }
        
        /// <summary>
        /// Get single item by entity
        /// </summary>
        /// <param name="item">object single entity</param>
        /// <returns></returns>
        public IList<TSys_User> GetByEntity(TSys_User entity)
        {
            IList<TSys_User> result = context.GetByEntity<TSys_User>(entity);

            return result;
        }

        /// <summary>
        /// Add item
        /// </summary>
        /// <param name="item">object single item</param>
        public void Add(TSys_User item)
        {
            context.Add(item);
        }

        /// <summary>
        /// Update Item
        /// </summary>
        /// <param name="item">object single item</param>
        public void Save(TSys_User item)
        {
            context.Save(item);
        }

        /// <summary>
        /// Delete Item
        /// </summary>
        /// <param name="item">object single item</param>
        public void Delete(TSys_User item)
        {
            context.Delete(item);
        }
	}

}
